package lesson6;

import java.util.Date;

public class StringExample1 {

		public static void main(String[] args) {
			
			String x = "";
			long ts = System.currentTimeMillis();
			for(int i = 0; i < 100000; i++)
			{
				x = x + "Krasi";
			}
			System.out.println(System.currentTimeMillis() - ts);

			long ts1 = System.currentTimeMillis();
			String y = "";
			for(int i = 0; i < 100000; i++)
			{
				y = y.concat("Krasi");
			}
			System.out.println(System.currentTimeMillis() - ts1);
			
			StringBuilder sb = new StringBuilder("");
			long ts2 = System.currentTimeMillis();
			for(int i = 0; i < 100000; i++)
			{
				sb.append("Krasi");
			}
			System.out.println(System.currentTimeMillis() - ts2);
		}
}
